#include "SMPPNumberOfMessages.hpp"

using namespace smpp::pdu;

NumberOfMessages::NumberOfMessages(const quint8 nValue):
TLV(TLVtags::TAG_NUMBER_OF_MESSAGES,1),_Value(nValue){}

NumberOfMessages::NumberOfMessages(
const NumberOfMessages &nNumberOfMessages):
TLV(nNumberOfMessages),_Value(nNumberOfMessages.getValue()){}

bool NumberOfMessages::operator ==(
	const NumberOfMessages &nNumberOfMessages) const{
	return (TLV::operator == (nNumberOfMessages) && 
			_Value == nNumberOfMessages.getValue());
}

bool NumberOfMessages::operator !=(
	const NumberOfMessages &nNumberOfMessages) const{
	return !this->operator == (nNumberOfMessages);
}

NumberOfMessages &NumberOfMessages::operator = (
	const NumberOfMessages &nNumberOfMessages){
	if(*this == nNumberOfMessages)
		return *this;
	TLV::operator = (nNumberOfMessages);
	_Value = nNumberOfMessages.getValue();
	return *this;
}

void NumberOfMessages::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 NumberOfMessages::getValue() const{
	return _Value;
}
